package com.ruoyi.project.mapper;

import com.ruoyi.project.ins.domain.InsPromotion;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface InsPromotionMapper {
    List<InsPromotion> selectInsPromotionList(InsPromotion insPromotion);

    InsPromotion selectByUserId(String emailAccount);

    int insertInsPromotion(InsPromotion insPromotion);

    int updateInsPromotion(InsPromotion insPromotion);

    InsPromotion selectAccountById(Long id);

    int deleteByIds(Long[] deleteIds);

    List<InsPromotion> selectByIds(Long[] ids);

    List<InsPromotion> selectNoPushedUser();

    int updatePromotionUserStatus(@Param("status") String status, @Param("userId") String userId);

    void batchUpdatePromotions(@Param("promotionList") List<InsPromotion> promotionList);

    // 批量查询已存在的用户ID
    List<String> selectExistUserIds(@Param("userIds") List<String> userIds);

    // 批量插入
    int batchInsert(@Param("list") List<InsPromotion> list);

    Map<String, Object> selectSumPromotion(InsPromotion insPromotion);
}
